package com.mybatis.flex.listener;

import com.mybatis.flex.entity.Account;
import com.mybatisflex.annotation.UpdateListener;

import java.util.Date;

public class FlexUpdateListener implements UpdateListener {
    @Override
    public void onUpdate(Object o) {
        Account account = (Account)o;
        account.setUpdateUser("admin");
        account.setUpdateDate(new Date());
        //account.setTenantId("....");
    }
}
